﻿using EasyToHelp.Common;
using EasyToHelp.Entity;
using System;
using System.Collections.Generic;
using System.Text;
using Newtonsoft.Json;

namespace EasyToHelp.Business
{
    public static class MemberBusiness
    {
        public static object Add(Member model)
        {
            //var s = HttpHelper.HttpPost(APIConfig.MemberReg, JsonConvert.SerializeObject(model));
            //return JsonHelper.DeserializeJsonToObject<ResultDTO>(s);

            HttpResponse<ResultDTO> myClass = Unirest.post(APIConfig.MemberReg)
            .header("accept", "application/json")
            .body(JsonConvert.SerializeObject(model))
            .asJson<ResultDTO>();
            return myClass.Body;
        }
    }
}
